package cn.com.surker.enums.system;

import cn.com.surker.enums.ICodeDescEnum;

/**
 * @Author lucky
 * @create 2024年05月20 10:57
 * @desc
 */
public enum SupplierTypeEnum implements ICodeDescEnum {

	CL(1, "材料", "cn.com.surker.erp.service.material.impl.ErpMaterialSupplierImpl"),
	CLYS(2, "材料运输", "cn.com.surker.erp.service.material.impl.ErpMaterialSupplierImpl"),
	CLXS(3, "材料销售", "cn.com.surker.erp.service.material.impl.ErpMaterialSupplierImpl"),
	BS(4, "泵送", "cn.com.surker.erp.service.production.impl.ErpPumpSupplierImpl"),
	LW(5, "劳务", "cn.com.surker.erp.service.production.impl.ErpProductionSupplierImpl"),
	WM(6, "材料销售", "cn.com.surker.erp.service.material.impl.ErpMaterialSupplierImpl"),
	SCYS(7, "生产运输", "cn.com.surker.erp.service.production.impl.ErpProductionSupplierImpl"),
	SGDW(9, "施工单位", "cn.com.surker.erp.service.material.impl.ErpProductionSupplierImpl"),
	FC(10, "辅材", "cn.com.surker.erp.service.material.impl.ErpMaterialSupplierImpl"),
	QT(8, "其他", "cn.com.surker.erp.service.material.impl.ErpMaterialSupplierImpl"),
	PCYS(11, "PC运输", "cn.com.surker.erp.service.material.impl.ErpMaterialSupplierImpl")
    ;

    private final String description;

    private final Integer code;

	/**
	 * 供应商对应的实现类
	 */
	private final String erpClass;

	SupplierTypeEnum(Integer code, String description, String erpClass) {
        this.description = description;
        this.code = code;
		this.erpClass = erpClass;
    }

    public String getDescription() {
        return description;
    }

    public Integer getCode() {return code;
	}

	public String getErpClass() {
		return erpClass;
	}

	public static SupplierTypeEnum getByType(Integer code) {
		SupplierTypeEnum[] values = values();
		for (SupplierTypeEnum v : values) {
			if (v.getCode().equals(code)) {
				return v;
			}
		}
		return null;
	}
}
